#ifndef __LINKEDLIST__
#define __LINKEDLIST__

struct llnode{
	int data;
	llnode* next;
};

struct llist{
	llist(){
		head.data = 0;
		head.next = &head;
		ptail = &head;
	}
	llnode head;
	llnode *ptail;

	void push_front(int a){
		llnode *p=new llnode;
		p->data = a;
		p->next = NULL;
		ptail->next = p;
		ptail = p;
	}

};


struct llist2{
	llist2(){
		head = new llnode;
		head->data = 0;
		head->next = NULL;
	}

	llnode* head;

	void push_front(int a){
		llnode *p=new llnode;
		p->data = a;
		p->next = head;
		head = p;
	}

};


#endif